#!/usr/bin/env python
#coding: utf-8

from lib.exception.column import *

class Column:
    """
    Column model class.
    """
    name = "" #名称
    url = "" #url地址
    domain = "" #主机域名
    save_path = "" #保存路径
    page_size = 35 #页容量
    page_record_total = 0 #记录集总数
    page_total = "" #总页数
    page_file = "" #分页文件
    page_total_regex = None #总页数正则
    regex = {} #抓取的其他正则

    def __init__(self, name=None, url=None):
        if name:
            self.name = name
        else:
            raise ColumnInitException("Column name can not be None!")
        if url:
            self.url = url
        else:
            raise ColumnInitException("Column url can not be None!")